<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    {if $auth->city_id == 0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">城市:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city_id" data-rule="required" data-source="general/lihua_city/index" data-order-by="weigh desc" class="form-control selectpage" name="row[city_id]" type="text" value="{$row.city_id|htmlentities}">
        </div>
    </div>
    {/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[type]-{$key}"><input id="row[type]-{$key}" data-rule="checked" name="row[type]" type="radio" value="{$key}" {in name="key" value="$row.type"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reach')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reach" data-rule="required" class="form-control" step="1" name="row[reach]" type="number" value="{$row.reach|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reduce')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reduce" data-rule="required" class="form-control" step="1" name="row[reduce]" type="number" value="{$row.reduce|htmlentities}" placeholder="红包面额">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">有效天数:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-days" data-rule="required" class="form-control" step="1" name="row[days]" type="number" value="{$row.days|htmlentities}" placeholder="有效天数">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择商品(不填,红包支持所有商品):</label>
        <div class="col-xs-12 col-sm-8">
            <input 
                id="c-goods" 
                data-source="goods/lihua_goods/selgoods" 
                data-order-by="weigh desc" 
                data-multiple="true" 
                data-live-search="true" 
                data-field="name" 
                class="form-control selectpage" 
                name="row[goods]" 
                type="text" 
                value="{$row.goods}" 
                >
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
